﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Profile;
using System.Web;
using Model;
namespace HealthSystem
{
    public class ProfileComm : ProfileBase
    {
        [SettingsAllowAnonymous(true)]
        public virtual int UserID
        {
            get
            {
                return ((int)(this.GetPropertyValue("UserID")));
            }
            set
            {
                this.SetPropertyValue("UserID", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual string Name
        {
            get
            {
                return ((string)(this.GetPropertyValue("Name")));
            }
            set
            {
                this.SetPropertyValue("Name", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual string DistrictId
        {
            get
            {
                return ((string)(this.GetPropertyValue("DistrictId")));
            }
            set
            {
                this.SetPropertyValue("DistrictId", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual string ParentDistrictId
        {
            get
            {
                return ((string)(this.GetPropertyValue("ParentDistrictId")));
            }
            set
            {
                this.SetPropertyValue("ParentDistrictId", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual int RoleId
        {
            get
            {
                return ((int)(this.GetPropertyValue("RoleId")));
            }
            set
            {
                this.SetPropertyValue("RoleId", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual string SchoolId
        {
            get
            {
                return ((string)(this.GetPropertyValue("SchoolId")));
            }
            set
            {
                this.SetPropertyValue("SchoolId", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual string OrgId
        {
            get
            {
                return ((string)(this.GetPropertyValue("OrgId")));
            }
            set
            {
                this.SetPropertyValue("OrgId", value);
            }
        }




        [SettingsAllowAnonymous(true)]

        public virtual HW_Manger_Admin_User AdminUser
        {
            get
            {
                return ((HW_Manger_Admin_User)(this.GetPropertyValue("AdminUser")));
            }
            set
            {
                this.SetPropertyValue("AdminUser", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual HW_OrgUser OrgUser
        {
            get
            {
                return ((HW_OrgUser)(this.GetPropertyValue("OrgUser")));
            }
            set
            {
                this.SetPropertyValue("OrgUser", value);
            }
        }
        [SettingsAllowAnonymous(true)]
        public virtual HW_School_User SchoolUser
        {
            get
            {
                return ((HW_School_User)(this.GetPropertyValue("SchoolUser")));
            }
            set
            {
                this.SetPropertyValue("SchoolUser", value);
            }
        }
        
        public static ProfileComm GetProfile()
        {
            return (ProfileComm)HttpContext.Current.Profile;
        }
        public static ProfileComm GetProfile(string userName)
        {
            return (ProfileComm)Create(userName);
        }
        public static ProfileComm GetProfile(string userName, bool isAno)
        {
            return (ProfileComm)Create(userName, isAno);
        }
    }
}